package design.patterns.builder;

/**
 * @author daxue0929
 * @date 2023/4/17
 * 抽象Builder类
 */

public abstract class Builder2 {
    //声明Bike类型的变量，并进行赋值
    protected Bike bike = new Bike();

    public abstract void buildFrame();

    public abstract void buildSeat();

    public abstract Bike createBike();


    //组装自行车的功能
    public Bike construct() {
        this.buildFrame();
        this.buildSeat();
        return this.createBike();
    }
}
